home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_09_01
/
9n01048a
< prev
next >
Wrap
Text File
|
1990-11-12
|
428b
|
34 lines
Listing 1
Function Definitions for K&R and ANSI
#define ANSI 1
#include <stdio.h>
#include <myheader.h>
int main()
{
int i;
for (i = 0; i < 10; i++)
printf("\n%d", func1(i));
}
#ifdef ANSI
int func1(int i) /* For an ANSI compiler */
#else
int func1(i) /* For a K&R compiler */
int i;
#endif
{
return i * i;
}